<link rel="stylesheet" href="/modules/leader/css/style.css">

<div class="frame-content weekday-setting">
    <div class="plan look">
        <p style="margin:0;padding:10px;display:inline-block;">学期时间设置</p>
        <button style="background-color: #5396f1; padding-bottom: 0; padding-top: 0; float: right; margin-top: 10px; margin-right: 10px" class="sui-btn btn-primary" id="save_button">保存</button>
        <input type="button" value="编辑" id="edit_button" class="time_setting_edit sui-btn btn-primary" style="background-color: #5396f1; padding-bottom: 0; padding-top: 0; float: right; margin-top: 10px; margin-right: 10px">
        <p style="color: darkgray; margin-bottom: 0; font-size: 12px; margin-left: 10px">＊学期时间外不记录考勤</p>
        <div style="border-bottom: 1px solid #cccccc;height:5px;"></div>

        <div class="leader_pan" id="display">
            <p style="margin-top: 10px; font-size: 14px; margin-left: 10px; color: darkgray" id="display_none_message">没有学期信息</p>
        </div>
        <div class="leader_pan" id="edit">
            <div class="add-time" id="add_term_button" style="margin-top: 10px; margin-bottom: 10px">
                <i class="iconfont">&#xe60c</i>添加新学期时间
            </div>
        </div>

    </div>
</div>

<script type="application/javascript" src="/lib/jquery.min.js"></script>
<script type="application/javascript" src="/lib/sui.min.js"></script>
<script type="application/javascript" src="/lib/underscore-min.js"></script>

<script type="application/javascript" src="/public/js/util.js"></script>
<script type="application/javascript" src="/public/js/ui.js"></script>
<script type="application/javascript" src="/modules/leader/js/leader.js"></script>
<script type="application/javascript" src="/modules/leader/js/query.js"></script>
<script id="choose-term-item" type="text/template">
    <%_.each(schoolCheckTimeSets, function(schoolCheckTimeSet) {%>
    <li role="presentation"><a role="menuitem" tabindex="-1" href="javascript:void(0);" style="font-weight:900"><%=schoolCheckTimeSet.name%></a></li>
    <%});%>
</script>

<script id="look-time-everyday" type="text/template">
    <%_.each(days,function(day,index){%>
    <% if(day.status==1){%>
    <div ><%= status[index]%><div style="width:70px;display:inline-block;"></div><%= day.quantum%></div><br>
    <%}});%>
</script>

<script id="look-item-festival" type="text/template">
    <%_.each(festivals,function(festival){
        var startDate = new Date(festival.start);
        var endDate = new Date(festival.end);
    %>
    <div style="float:left;padding-bottom:10px;width:100px;"><%=festival.name%></div>
    <%=formatDate(startDate)%>
    <div style="width:40px;display:inline-block;"></div>至<div style="width:40px;display:inline-block;"></div>
    <%=formatDate(endDate)%>
    </div>
    <div style="clear:both;"></div>
    <%});%>
</script>

<script id="edit-time-week" type="text/template">
    <!--传入checkTimeSet和weekLabels,quantumLabels数组-->
    <div class="set_time" id="set_time_weekdays">
        <div class="data">
            <p style="margin:0;padding-left:10px;display:inline-block;"><%=weekLabels[0]%>:</p>
        </div>
        <% _.each(checkTimeSet.weekdays,function(day,index){%>
        <div class="set_time-item">
            <form class="sui-form"  style="display: inline-block;">
                <% if (day.status==0){%>
                <label class="checkbox-pretty inline ">

                    <input type="checkbox" class="input_checkbox"><span style="margin-right:30px;"><%=quantumLabels[index]%></span>

                </label>
                <%}else{%>
                <label class="checkbox-pretty inline checked">

                    <input type="checkbox" checked class="input_checkbox"><span style="margin-right:30px;"><%=quantumLabels[index]%></span>

                </label>
                <%}%>
                <input value="<%=day.startTimeStr%>" type="text" class="from-time" data-toggle="timepicker" style="width:90px;text-align: center;">
            </form> -

            <form class="sui-form"  style="display: inline-block;">
                <input value="<%=day.endTimeStr%>" type="text" class="to-time" data-toggle="timepicker" style="width:90px;text-align: center;">
            </form>
        </div>
        <%});%>
    </div>
    <div class="set_time" id="set_time_sat">
        <div class="data">
            <p style="margin:0;padding-left:10px;display:inline-block;"><%=weekLabels[1]%>:</p>
        </div>
        <% _.each(checkTimeSet.saturday,function(day,index){%>
        <div class="set_time-item">
            <form class="sui-form"  style="display: inline-block;">
                <% if (day.status==0){%>
                <label class="checkbox-pretty inline ">

                    <input type="checkbox" class="input_checkbox"><span style="margin-right:30px;"><%=quantumLabels[index]%></span>

                </label>
                <%}else{%>
                <label class="checkbox-pretty inline checked">

                    <input type="checkbox" checked class="input_checkbox"><span style="margin-right:30px;"><%=quantumLabels[index]%></span>

                </label>
                <%}%>
                <input value="<%=day.startTimeStr%>" type="text" class="from-time" data-toggle="timepicker" style="width:90px;text-align: center;">
            </form> -

            <form class="sui-form"  style="display: inline-block;">
                <input value="<%=day.endTimeStr%>" type="text" class="to-time" data-toggle="timepicker" style="width:90px;text-align: center;">
            </form>
        </div>
        <%});%>
    </div>
    <div class="set_time" id="set_time_sun">
        <div class="data">
            <p style="margin:0;padding-left:10px;display:inline-block;"><%=weekLabels[2]%>:</p>
        </div>
        <% _.each(checkTimeSet.sunday,function(day,index){%>
        <div class="set_time-item">
            <form class="sui-form"  style="display: inline-block;">
                <% if (day.status==0){%>
                <label class="checkbox-pretty inline ">

                    <input type="checkbox"  class="input_checkbox"><span style="margin-right:30px;"><%=quantumLabels[index]%></span>

                </label>
                <%}else{%>
                <label class="checkbox-pretty inline checked">

                    <input type="checkbox" checked class="input_checkbox"><span style="margin-right:30px;"><%=quantumLabels[index]%></span>

                </label>
                <%}%>
                <input value="<%=day.startTimeStr%>" type="text" class="from-time" data-toggle="timepicker" style="width:90px;text-align: center;">
            </form> -

            <form class="sui-form"  style="display: inline-block;">
                <input value="<%=day.endTimeStr%>" type="text" class="to-time" data-toggle="timepicker" style="width:90px;text-align: center;">
            </form>
        </div>
        <%});%>
    </div>
</script>
<script id="hol_tag_item" type="text/template">
    <%_.each(festivalTips,function(tip){%>
    <li><%=tip.name%></li>
    <%});%>
</script>

<script id="edit_hol_item" type="text/template">
    <%_.each(festivals,function(festival){%>
    <div class="hol_lump-item" >
        <input type="text" value="<%=festival.name%>" style="width:70px;height:18px;padding:2px 4px;border: 1px solid #cccccc;font-size: 12px;">

        <form class="sui-form demo8" style="margin-left: 20px;display: inline-block;">
            <input type="text" value="<%=festival.fromDateTime%>">
        </form>


        至

        <form class="sui-form demo9" style="display: inline-block;">
            <input type="text" value="<%=festival.toDateTime%>">
        </form>

        <input type="button" value="删除" class="del_btn">
    </div>
    <%});%>
</script>
<script id="add_hol_item" type="text/template">
    <div class="hol_lump-item" >
        <input type="text" value="<%=festival.name%>" style="width:70px;height:18px;padding:2px 4px;border: 1px solid #cccccc;font-size: 12px;">

        <form class="sui-form demo8"  style="margin-left: 20px;display: inline-block;">
            <input type="text" value="<%=festival.fromDateTime%>">
        </form>


        至

        <form class="sui-form demo9"  style="display: inline-block;">
            <input type="text" value="<%=festival.toDateTime%>">
        </form>

        <input type="button" value="删除" class="del_btn">
    </div>
</script>
